<template>
  <div class="page">
    <div class="page_top ai-margin-bottom ai-border-bottom">
      <div class="cont ai-margin-tb-sz ai-margin-lr">
        <div class="cont_left">
          <el-upload class="upload-demo" action="#" :http-request="handleDetailsFile">
            <el-button style="margin:0 10px" size="small" type="primary">点击上传</el-button>
          </el-upload>
          <el-button size="small" style="margin:0 10px" type="success" icon="el-icon-download">下载模板</el-button>
          <el-button size="small" style="margin:0 10px" type="success" icon="el-icon-download">导出订单</el-button>
          <el-button
            size="small"
            style="margin:0 10px"
            type="primary"
            icon="el-icon-circle-plus"
          >新增订单</el-button>
        </div>
        <div class="cont_right">
          <el-select size="small" v-model="formInline.region" placeholder="请选择活动区域">
            <el-option label="订单号" value="number"></el-option>
            <el-option label="姓名" value="name"></el-option>
            <el-option label="电话号码" value="phone"></el-option>
            <el-option label="渠道来源" value="source"></el-option>
            <el-option label="订单状态" value="statue"></el-option>
            <el-option label="用车日期" value="time"></el-option>
          </el-select>
          <el-input
            size="small"
            v-model="formInline.id"
            placeholder="请输入查询内容"
            style="width: 200px;"
            @input="handleContent"
            @keyup.enter.native="onSubmit"
          />
          <el-button
            size="small"
            style="margin:0 10px"
            type="primary"
            icon="el-icon-search"
            @click="onSubmit"
          >查询</el-button>
        </div>
      </div>
    </div>
    <div class="page_bottom">
      <el-table
        :data="tableData.slice((currpage - 1) * pageSizes, currpage * pageSizes)"
        border
        stripe
        style="width: 100%"
      >
        <el-table-column type="expand">
          <template slot-scope="props">
            <el-form label-position="left" inline class="demo-table-expand">
              <el-form-item label="用车日期">
                <span>{{ props.row.carDate }}</span>
              </el-form-item>
              <el-form-item label="用车时间">
                <span>{{ props.row.carTime }}</span>
              </el-form-item>
              <el-form-item label="车型">
                <span>{{ props.row.carModel }}</span>
              </el-form-item>
              <el-form-item label="订单类型">
                <span>{{ props.row.orderType }}</span>
              </el-form-item>
              <el-form-item label="接驳类型">
                <span>{{ props.row.typeOfConnection }}</span>
              </el-form-item>
              <el-form-item label="上车地点">
                <span>{{ props.row.pickUpPoint }}</span>
              </el-form-item>
              <el-form-item label="下车地点">
                <span>{{ props.row.dropOffPoint }}</span>
              </el-form-item>
              <el-form-item label="航班号/动车车次/班车号">
                <span>{{ props.row.frequencyNum }}</span>
              </el-form-item>
              <el-form-item label="下单人员">
                <span>{{ props.row.orderPerson }}</span>
              </el-form-item>
              <el-form-item label="下单日期">
                <span>{{ props.row.orderTime }}</span>
              </el-form-item>
              <el-form-item label="渠道来源">
                <span>{{ props.row.source }}</span>
              </el-form-item>
              <el-form-item label="所在城市">
                <span>{{ props.row.city }}</span>
              </el-form-item>
            </el-form>
          </template>
        </el-table-column>
        <el-table-column prop="orderNumber" label="订单号" width="130" align="center"></el-table-column>
        <el-table-column
          prop="orderStatus"
          label="订单状态"
          align="center"
          width="120"
          :filters="[{ text: '未处理', value: 0 }, { text: '已处理', value: 1 }]"
          :filter-method="filterTag"
          filter-placement="bottom-end"
        >
          <template slot-scope="scope">
            <el-tag
              size="mini"
              :type="scope.row.orderStatus === 0 ? 'danger' : 'success'"
              disable-transitions
            >{{scope.row.orderStatus === 0 ? '未处理' :'已处理'}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="passengerName" label="乘车人姓名" min-width="120" align="center"></el-table-column>
        <el-table-column
          prop="passengerContactInformation"
          label="联系方式"
          min-width="140"
          align="center"
        ></el-table-column>
        <el-table-column prop="alternateContact" label="备用联系电话" min-width="140" align="center"></el-table-column>
        <el-table-column prop="numberOfPeople" label="人数" min-width="120" align="center"></el-table-column>
        <el-table-column prop="carDate" label="用车时间" min-width="140" align="center"></el-table-column>
        <el-table-column prop="pickUpPoint" label="上车地点" min-width="180" align="center"></el-table-column>
        <el-table-column prop="dropOffPoint" label="下车地点" min-width="180" align="center"></el-table-column>
        <el-table-column prop="orderTime" label="下单日期" min-width="180" align="center"></el-table-column>
        <el-table-column prop="frequencyNum" label=" 航班号/动车车次/班车号" min-width="140" align="center"></el-table-column>
        <el-table-column prop="price" label="价格" min-width="140" align="center"></el-table-column>
        <el-table-column fixed="right" label="操作" min-width="345" align="center">
          <template slot-scope="scope">
            <el-button type="primary" size="mini" @click="handleDetails(scope.row)">查看详情</el-button>
            <el-button type="success" size="mini" @click="handleAllot(scope.row)">派单</el-button>
            <el-button type="warning" style="margin:0 10px" size="mini" @click="handleTransmit">转发消息</el-button>
            <!-- <el-dropdown trigger="click" @command="handleCommand">
              <el-button type="warning" style="margin:0 10px" size="mini">转发消息</el-button>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="drive">司机</el-dropdown-item>
                <el-dropdown-item command="travel">旅行社</el-dropdown-item>
                <el-dropdown-item command="client">客户</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>-->
            <el-button type="danger" size="mini" @click="handleDelete(scope.row)">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div class="pagination ai-margin-tb" style="text-align: center">
        <el-pagination
          background
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage1"
          :page-size="pageSizes"
          :page-sizes="sizes"
          layout="total, prev, pager, next"
          :total="tableData.length"
        ></el-pagination>
        <!-- , prev, pager, next -->
      </div>
    </div>
    <!--        弹框-->
    <el-dialog title="派单" :visible.sync="dialogVisible" width="45%" :before-close="handleClose">
      <el-form ref="form" :model="formIndent" label-width="120px">
        <el-form-item label="派单时间">
          <el-col :span="11">
            <el-date-picker
              type="date"
              placeholder="开始时间"
              v-model="formIndent.begin_Time"
              style="width: 100%;"
            ></el-date-picker>
          </el-col>
          <el-col class="line" :span="2">-</el-col>
          <el-col :span="11">
            <el-time-picker placeholder="结束时间" v-model="formIndent.end_Time" style="width: 100%;"></el-time-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="分派司机">
          <el-select v-model="formIndent.drive" placeholder="请选择">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="hanldeAllotDrive">确 定</el-button>
      </span>
    </el-dialog>
    <!--        弹框-->
    <el-dialog title="选择转发对象" :visible.sync="dialogVisibleInfor" width="45%">
      <el-form ref="form" :model="formIndent" label-width="120px">
        <el-form-item label="转发对象">
          <el-checkbox
            :indeterminate="isIndeterminate"
            v-model="checkAll"
            @change="handleCheckAllChange"
          >全选</el-checkbox>
          <div style="margin: 15px 0;"></div>
          <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
            <el-checkbox v-for="city in cityOptions" :label="city" :key="city">{{city}}</el-checkbox>
          </el-checkbox-group>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisibleInfor = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisibleInfor = false">确 定</el-button>
      </span>
    </el-dialog>
    <!--        侧边框-->
    <el-drawer title="我是标题" :visible.sync="drawer" :with-header="false" size="40%">
      <el-form
        :model="form"
        label-width="200px"
        style="height: calc(100vh - 40px); "
        class="ai-margin-tb ai-text-auto"
      >
        <el-form-item label="图片：">
          <label v-if="form.file.length === 0">无图片</label>
          <div v-else v-for="(list,index) in form.file" :key="index">
            <img :src="list.file" width="200" height="150" />
          </div>
        </el-form-item>
        <el-form-item label="公司名称：">
          <label>{{formEquipment.user_dep === null ? '——' : formEquipment.user_dep}}</label>
        </el-form-item>
        <el-form-item label="公司地址：">
          <label>{{formEquipment.user_address === null ? '——' : formEquipment.user_address}}</label>
        </el-form-item>
        <el-form-item label="公司负责人：">
          <label>{{formEquipment.user === null ? '——' : formEquipment.user}}</label>
        </el-form-item>
        <el-form-item label="负责人电话：">
          <label>{{formEquipment.user_phone === null ? '——' : formEquipment.user_phone}}</label>
        </el-form-item>
        <el-form-item label="设备型号：">
          <label>{{formEquipment.type === null ? '——' : formEquipment.type }}</label>
        </el-form-item>
        <el-form-item label="设备ID：">
          <label>{{formEquipment.id === null ? '——' : formEquipment.id }}</label>
        </el-form-item>
        <el-form-item label="安装日期：">
          <label>{{formEquipment.installDate === null ? '——' : formEquipment.installDate}}</label>
        </el-form-item>
        <el-form-item label="评价类型：">
          <el-tag
            :type="form.type === '0' ? 'primary' : 'success'"
            disable-transitions
          >{{form.type === '0' ? '意见' :'投诉'}}</el-tag>
        </el-form-item>
        <el-form-item label="内容：">
          <label>{{form.content === null || form.content === "" ? '——' : form.content}}</label>
        </el-form-item>
        <el-form-item label="提交人：">
          <label>{{form.user === null ? '——' : form.user }}</label>
        </el-form-item>
        <el-form-item label="联系电话：">
          <label>{{form.user_phone === null || form.user_phone === "" ? '——' : form.user_phone}}</label>
        </el-form-item>
        <el-form-item label="提交时间：">
          <label>{{form.createTime === null || form.createTime === "" ? '——' : form.createTime}}</label>
        </el-form-item>
        <el-form-item label="是否处理：">
          <el-tag
            :type="form.status === 0 ? 'warning' : 'primary'"
          >{{form.status === 0 ? '未处理' : '已处理' }}</el-tag>
        </el-form-item>
        <el-form-item label="处理意见：" class="ai-margin-right">
          <el-input type="textarea" v-if="form.status !== 1" :rows="6" v-model="form.result"></el-input>
          <el-input type="textarea" v-else :rows="6" v-model="form.result" :disabled="true"></el-input>
          <div class="ai-float-left ai-display-ib">
            <span class="ai-font-color-red ai-margin-right-sz">*</span>
            <span class="ai-font-size-mini ai-font-color-ld">处理结果将以短信的方式送给用户</span>
          </div>
        </el-form-item>
        <div class="demo-drawer__footer ai-margin">
          <el-button class="ai-float-right ai-margin-left" @click="drawer = false">取消</el-button>
          <el-button
            type="primary"
            v-if="form.status !== 1"
            class="ai-float-right"
            @click="handleDispose"
          >立即处理</el-button>
          <el-button type="primary" v-else class="ai-float-right" disabled>立即处理</el-button>
        </div>
      </el-form>
    </el-drawer>
  </div>
</template>

<script>
import {
  deleteEvaluateById,
  getEvaluate,
  getEvaluateById,
  getEvaluateByParams,
  handlingComplaintsEvaluate,
  updateStatus
} from "../../api/evaluate";
import { getEquipmentById } from "../../api/equipment";

export default {
  name: "evaluate",
  data() {
    return {
      currentPage1: 1,
      currpage: 1,
      pageSizes: 10,
      sizes: [10, 20, 30],
      cityOptions: ["司机", "旅行社", "客户"],
      checkAll: false,
      checkedCities: [],
      // cities: cityOptions,
      isIndeterminate: true,
      tableData: [
        {
          orderNumber: "0010012",
          orderStatus: 0,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 5,
          numberOfLuggage: 5,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 86.5,
          city: "重庆市",
          source: "沙坪坝区"
        },
        {
          orderNumber: "0010013",
          orderStatus: 1,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 5,
          numberOfLuggage: 6,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 106.5,
          city: "重庆市",
          source: "沙坪坝区"
        },
        {
          orderNumber: "0010014",
          orderStatus: 0,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 6,
          numberOfLuggage: 5,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 56.5,
          city: "重庆市",
          source: "沙坪坝区"
        },
        {
          orderNumber: "0010015",
          orderStatus: 1,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 5,
          numberOfLuggage: 4,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 82.1,
          city: "重庆市",
          source: "沙坪坝区"
        },
        {
          orderNumber: "0010016",
          orderStatus: 1,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 5,
          numberOfLuggage: 5,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 86.5,
          city: "重庆市",
          source: "沙坪坝区"
        },
        {
          orderNumber: "0010017",
          orderStatus: 0,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 5,
          numberOfLuggage: 5,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 86.5,
          city: "重庆市",
          source: "沙坪坝区"
        },
        {
          orderNumber: "0010018",
          orderStatus: 0,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 5,
          numberOfLuggage: 5,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 126.8,
          city: "重庆市",
          source: "沙坪坝区"
        },
        {
          orderNumber: "0010019",
          orderStatus: 0,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 5,
          numberOfLuggage: 5,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 12.1,
          city: "重庆市",
          source: "沙坪坝区"
        },
        {
          orderNumber: "0010020",
          orderStatus: 1,
          passengerName: "带头",
          passengerContactInformation: "18875372539",
          alternateContact: "这个点话打不通",
          numberOfPeople: 5,
          numberOfLuggage: 5,
          specialRequirements: "加点米饭加点米饭",
          carDate: "2020-7-15",
          carTime: "17:25",
          carModel: "桑塔纳",
          orderType: "普通订单",
          typeOfConnection: "火车站回去",
          pickUpPoint: "重庆市重庆北站",
          dropOffPoint: "重庆市沙坪坝区",
          frequencyNum: "C919",
          orderPerson: "程序猿",
          orderTime: "2020-7-15 20:44",
          price: 89.5,
          city: "重庆市",
          source: "沙坪坝区"
        }
      ],
      formIndent: {
        begin_Time: "",
        end_Time: "",
        drive: ""
      },
      options: [
        {
          value: "1",
          label: "司机1"
        },
        {
          value: "2",
          label: "司机2"
        },
        {
          value: "3",
          label: "司机3"
        },
        {
          value: "4",
          label: "司机4"
        },
        {
          value: "5",
          label: "司机5"
        }
      ],
      dialogVisible: false,
      dialogVisibleInfor: false,
      audit: {
        content: "",
        phone: ""
      },
      formInline: {
        id: ""
      },
      drawer: false,
      form: {
        id: "",
        type: "",
        content: "",
        repair_id: "",
        user: "",
        user_phone: "",
        status: "",
        result: "",
        file: [],
        equipment: ""
      },
      formEquipment: {
        id: "",
        type: "",
        configure: "",
        number: "",
        ink_type: "",
        installDate: "",
        engineer: "",
        user_dep: "",
        user_address: "",
        user: "",
        user_phone: "",
        engineer_id: ""
      }
    };
  },
  mounted() {
    // this.handleContent();
  },
  methods: {
    handleCheckAllChange(val) {
      this.checkedCities = val ? this.cityOptions : [];
      this.isIndeterminate = false;
    },
    handleCheckedCitiesChange(value) {
      let checkedCount = value.length;
      this.checkAll = checkedCount === this.cityOptions.length;
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.cityOptions.length;
    },
    handleTransmit() {
      this.dialogVisibleInfor = true
    },
    /**
     * 获取评价
     */
    handleContent() {
      getEvaluate()
        .then(rsp => {
          console.log(rsp);
          this.tableData = rsp.result;
        })
        .catch(respond => {
          console.log(respond);
        });
    },
    /**
     * 上传indent
     */
    handleDetailsFile(object) {
      console.log(object);
    },

    /**
     * 派单
     */
    handleAllot() {
      this.dialogVisible = true;
    },
    hanldeAllotDrive(row) {
      console.log(row);
      this.dialogVisible = false;
    },

    /**
     * 信息转发
     */

    handleCommand(command) {
      this.$message("click on item " + command);
    },

    /**
     * 处理意见
     */
    handleDispose() {
      // this.audit.phone = row.phone;
      // this.dialogVisible = true;
      if (this.form.result === "") {
        this.$message.warning("请输入处理意见");
      } else {
        console.log(this.form);
        handlingComplaintsEvaluate({
          evaluate_id: this.form.id,
          content: this.form.result,
          phone: this.form.user_phone
        })
          .then(rsp => {
            console.log(rsp);
            let row = {
              id: this.form.id,
              equipment_id: this.formEquipment.id
            };
            this.handleStatus(this.form.id);
            this.$message.success(rsp.msg);
            this.handleContent();
            this.handleDetails(row);
          })
          .catch(respond => {
            console.log(respond);
            this.$message.warning(respond.msg);
          });
      }
    },
    /**
     * 更新状态
     * @param id
     */
    handleStatus(id) {
      updateStatus(id)
        .then(rsp => {
          console.log(rsp);
        })
        .catch(respond => {
          console.log(respond);
        });
    },
    /**
     * 处理评价
     */
    auditSubmit() {
      console.log(this.audit);
      if (this.audit.content === "") {
        this.$message.warning("请输入处理意见");
      } else {
        const params = new URLSearchParams();
        params.append("content", this.audit.content);
        params.append("phone", this.audit.phone);
        handlingComplaintsEvaluate(this.audit)
          .then(rsp => {
            console.log(rsp);
            this.$message.success(rsp.msg);
            this.handleContent();
            this.dialogVisible = false;
          })
          .catch(respond => {
            console.log(respond);
          });
      }
    }, //处理评价

    /**
     * 查看详情
     * @param row
     */
    handleDetails(row) {
      console.log(row);
      getEvaluateByParams(row)
        .then(rsp => {
          console.log(rsp);
          this.drawer = true;
          this.form = rsp.result[0];
          let id = this.form.equipment_id;
          this.handleEquipmentDetail(id);
        })
        .catch(respond => {
          console.log(respond);
        });
    },
    /**
     * 获取设备信息
     * @param id
     */
    handleEquipmentDetail(id) {
      getEquipmentById(id)
        .then(rsp => {
          console.log(rsp);
          this.drawer = true;
          this.formEquipment = rsp.result[0];
        })
        .catch(respond => {});
      console.log(this.form);
    },

    /**
     * 删除评价
     * @param row
     */
    handleDelete(row) {
      console.log(row.id);
      this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          deleteEvaluateById(row.id)
            .then(rsp => {
              console.log(rsp);
              this.$message.success(rsp.msg);
              this.handleContent();
            })
            .catch(respond => {});
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除"
          });
        });
    }, //删除评价

    /**
     * 查看评价
     */
    onSubmit() {
      console.log(this.formInline);
      if (this.formInline.id === "") {
        this.$message.warning("请输入id");
      } else {
        getEvaluateById(this.formInline.id)
          .then(rsp => {
            console.log(rsp);
            this.tableData = [];
            this.$message.success(rsp.msg);
            this.tableData = rsp.result;
          })
          .catch(respond => {
            console.log(respond);
          });
      }
    },
    handleSizeChange(val) {
      this.pageSizes = val;
    },
    handleCurrentChange(val) {
      this.currpage = val;
    },
    filterTag(value, row) {
      return row.type === value;
    },
    handleClose(done) {
      done();
    }
  }
};
</script>

<style scoped lang="scss">
.page {
  width: 95%;
  margin: 0 auto;
  .page_top {
    .cont {
      margin: 30px 0px;
      display: flex;
      flex-direction: row;
      .cont_left {
        flex: 1;
        display: flex;
        flex-direction: row;
      }
      .cont_right {
        flex: 1;
        text-align: right;
      }
    }
  }
}
.demo-table-expand {
  font-size: 0;
}
.demo-table-expand label {
  width: 90px;
  color: #99a9bf;
}
.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 35%;
}
</style>
